<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<h2>${car.model} summary</h2>

<hr/>

<h4>Model: ${car.model}</h4>

<p>Description: ${car.description}</p>

<p>${car.engineType.description} engine.</p>

<p>This car is ${(car.used) ? "" : "not" } used</p>

<p>Mileage: ${(car.mileage > 0) ? car.mileage : "No"}</p>

<h4>Features:</h4>

<c:choose>
    <c:when test="${empty car.features}">
        (No features)
    </c:when>
    <c:otherwise>
        <ul>
            <c:forEach var="feature" items="${car.features}">
                <li>${feature.description}</li>
            </c:forEach>
        </ul>
    </c:otherwise>
</c:choose>

<p>Seller: ${car.seller.title}</p>

<p>Available starting: ${car.availableDate}</p>

<h4>Price: ${car.price} $</h4>
